#ifndef RENDERER_H_
#define RENDERER_H_

#include "OffscreenSurface.hpp"
#include "Camera.hpp"
#include "Logger.hpp"
#include "Page.hpp"
#include "Shader.hpp"
#include "DeferredLight.hpp"
#include "TextureLibrary.hpp"
#include "ShaderLibrary.hpp"
#include <cassert>
#include <string>
#include <iostream>
#include <QtCore>

using namespace std;

class Page;
class Shader;
class DeferredLight;
class Texture;


class Renderer
{
private:
	Renderer() { }
	
public:
	static void initialize();
	
	static void frame();
	
	static void resize( int width, int height );
	
	static void setMainCamera( Camera* cam ) { m_camera = cam; }
	
protected:
	static void renderScene();
	static void shadowPass();
	static void setupShadowMatrix();
	
	static OffscreenSurface shadowBuffer;
			
	static Camera *m_camera;
	
    static QList<Page*> m_pages;
	
	static int m_windowWidth;
	static int m_windowHeight;
	static float aspect;
		
	static Texture* m_grass;
	static Shader* m_groundShader;
	
};



#endif
